package cn.caplike.demo.repository.design.pattern.callback;

/**
 * @author LiKe
 * @date 2019-12-05 17:11
 */
public class Printer {

    public void print(Callback callback) {
        System.out.println("正在打印 . . . ");
        try {
            Thread.sleep(3000);// 毫秒
        } catch (Exception e) {
            e.printStackTrace();
        }
        callback.printFinished("打印完成");
    }

}
